package cn.tp.ksoft.civil_driver.dialog;

import android.content.Context;
import android.util.SparseArray;
import android.view.View;

import cn.tp.ksoft.civil_driver.R;

/**
 * Created by zhusong on 16/5/11.
 */
public class SeatDialog extends WheelDialog {
    public SeatDialog(Context context) {
        super(context);
    }

    @Override
    protected void initData() {
        mTitleTv.setText(getContext().getString(R.string.driver_car_seat));
        mWheel1.setVisibility(View.VISIBLE);
        mWheel2.setVisibility(View.GONE);
        mWheel3.setVisibility(View.GONE);
        SparseArray<String> seats = new SparseArray<>(4);
        seats.append(4, "4");
        seats.append(5, "5");
        seats.append(7, "7");
        seats.append(9, "9");
        mWheelAdapter1.setData(seats);
    }

    @Override
    protected void onPositiveClick() {
        if (null != mCallBack) {
            mCallBack.onPositiveClick(mWheelAdapter1.getKey(mWheel1.getCurrentItem()));
        }
    }
}
